/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.sc.vessel.info.model.breakdown.impl;

import com.sc.vessel.info.model.breakdown.Accident;
import com.sc.vessel.info.model.breakdown.AttributeIdentify;
import com.sc.vessel.info.model.breakdown.BreakdownFactory;
import com.sc.vessel.info.model.breakdown.BreakdownPackage;
import com.sc.vessel.info.model.breakdown.Component;

import com.sc.vessel.info.model.breakdown.ConfigElement;
import com.sc.vessel.info.model.breakdown.ConfigElementSelected;
import com.sc.vessel.info.model.breakdown.Configuration;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class BreakdownPackageImpl extends EPackageImpl implements BreakdownPackage {
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass componentEClass = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass configurationEClass = null;
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass configElementEClass = null;
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass attributeIdentifyEClass = null;
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass accidentEClass = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass configElementSelectedEClass = null;

    /**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
     * package URI value.
     * <p>Note: the correct way to create the package is via the static
     * factory method {@link #init init()}, which also performs
     * initialization of the package, or returns the registered package,
     * if one already exists.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see com.sc.vessel.info.model.breakdown.BreakdownPackage#eNS_URI
     * @see #init()
     * @generated
     */
    private BreakdownPackageImpl() {
        super(eNS_URI, BreakdownFactory.eINSTANCE);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private static boolean isInited = false;

    /**
     * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
     * 
     * <p>This method is used to initialize {@link BreakdownPackage#eINSTANCE} when that field is accessed.
     * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
    public static BreakdownPackage init() {
        if (isInited) return (BreakdownPackage)EPackage.Registry.INSTANCE.getEPackage(BreakdownPackage.eNS_URI);

        // Obtain or create and register package
        BreakdownPackageImpl theBreakdownPackage = (BreakdownPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof BreakdownPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new BreakdownPackageImpl());

        isInited = true;

        // Create package meta-data objects
        theBreakdownPackage.createPackageContents();

        // Initialize created meta-data
        theBreakdownPackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        theBreakdownPackage.freeze();

  
        // Update the registry and return the package
        EPackage.Registry.INSTANCE.put(BreakdownPackage.eNS_URI, theBreakdownPackage);
        return theBreakdownPackage;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getComponent() {
        return componentEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getComponent_Name() {
        return (EAttribute)componentEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getComponent_Components() {
        return (EReference)componentEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getComponent_ItemId() {
        return (EAttribute)componentEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getComponent_Breakdowns() {
        return (EReference)componentEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getConfiguration() {
        return configurationEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getConfiguration_Elements() {
        return (EReference)configurationEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getConfigElement() {
        return configElementEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getConfigElement_Name() {
        return (EAttribute)configElementEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getConfigElement_ItemId() {
        return (EAttribute)configElementEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getConfigElement_AttributeIdentifies() {
        return (EReference)configElementEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getConfigElement_Order() {
        return (EAttribute)configElementEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getAttributeIdentify() {
        return attributeIdentifyEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAttributeIdentify_Name() {
        return (EAttribute)attributeIdentifyEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAttributeIdentify_ItemId() {
        return (EAttribute)attributeIdentifyEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getAccident() {
        return accidentEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAccident_Phenomenon() {
        return (EAttribute)accidentEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAccident_Process() {
        return (EAttribute)accidentEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAccident_Analyze() {
        return (EAttribute)accidentEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAccident_Experience() {
        return (EAttribute)accidentEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getAccident_Component() {
        return (EReference)accidentEClass.getEStructuralFeatures().get(4);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getAccident_ConfigElements() {
        return (EReference)accidentEClass.getEStructuralFeatures().get(5);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAccident_ItemId() {
        return (EAttribute)accidentEClass.getEStructuralFeatures().get(6);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getConfigElementSelected() {
        return configElementSelectedEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getConfigElementSelected_ConfigElement() {
        return (EReference)configElementSelectedEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getConfigElementSelected_SelectedValue() {
        return (EAttribute)configElementSelectedEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public BreakdownFactory getBreakdownFactory() {
        return (BreakdownFactory)getEFactoryInstance();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private boolean isCreated = false;

    /**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features
        componentEClass = createEClass(COMPONENT);
        createEAttribute(componentEClass, COMPONENT__NAME);
        createEReference(componentEClass, COMPONENT__COMPONENTS);
        createEAttribute(componentEClass, COMPONENT__ITEM_ID);
        createEReference(componentEClass, COMPONENT__BREAKDOWNS);

        configurationEClass = createEClass(CONFIGURATION);
        createEReference(configurationEClass, CONFIGURATION__ELEMENTS);

        configElementEClass = createEClass(CONFIG_ELEMENT);
        createEAttribute(configElementEClass, CONFIG_ELEMENT__NAME);
        createEAttribute(configElementEClass, CONFIG_ELEMENT__ITEM_ID);
        createEReference(configElementEClass, CONFIG_ELEMENT__ATTRIBUTE_IDENTIFIES);
        createEAttribute(configElementEClass, CONFIG_ELEMENT__ORDER);

        attributeIdentifyEClass = createEClass(ATTRIBUTE_IDENTIFY);
        createEAttribute(attributeIdentifyEClass, ATTRIBUTE_IDENTIFY__NAME);
        createEAttribute(attributeIdentifyEClass, ATTRIBUTE_IDENTIFY__ITEM_ID);

        accidentEClass = createEClass(ACCIDENT);
        createEAttribute(accidentEClass, ACCIDENT__PHENOMENON);
        createEAttribute(accidentEClass, ACCIDENT__PROCESS);
        createEAttribute(accidentEClass, ACCIDENT__ANALYZE);
        createEAttribute(accidentEClass, ACCIDENT__EXPERIENCE);
        createEReference(accidentEClass, ACCIDENT__COMPONENT);
        createEReference(accidentEClass, ACCIDENT__CONFIG_ELEMENTS);
        createEAttribute(accidentEClass, ACCIDENT__ITEM_ID);

        configElementSelectedEClass = createEClass(CONFIG_ELEMENT_SELECTED);
        createEReference(configElementSelectedEClass, CONFIG_ELEMENT_SELECTED__CONFIG_ELEMENT);
        createEAttribute(configElementSelectedEClass, CONFIG_ELEMENT_SELECTED__SELECTED_VALUE);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private boolean isInitialized = false;

    /**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Create type parameters

        // Set bounds for type parameters

        // Add supertypes to classes

        // Initialize classes and features; add operations and parameters
        initEClass(componentEClass, Component.class, "Component", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getComponent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getComponent_Components(), this.getComponent(), null, "components", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getComponent_ItemId(), ecorePackage.getEString(), "itemId", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getComponent_Breakdowns(), this.getAccident(), null, "breakdowns", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(configurationEClass, Configuration.class, "Configuration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getConfiguration_Elements(), this.getConfigElement(), null, "elements", null, 0, -1, Configuration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(configElementEClass, ConfigElement.class, "ConfigElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getConfigElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, ConfigElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getConfigElement_ItemId(), ecorePackage.getEString(), "itemId", null, 0, 1, ConfigElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getConfigElement_AttributeIdentifies(), this.getAttributeIdentify(), null, "attributeIdentifies", null, 0, -1, ConfigElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getConfigElement_Order(), ecorePackage.getEInt(), "order", null, 0, 1, ConfigElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(attributeIdentifyEClass, AttributeIdentify.class, "AttributeIdentify", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getAttributeIdentify_Name(), ecorePackage.getEString(), "name", null, 0, 1, AttributeIdentify.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAttributeIdentify_ItemId(), ecorePackage.getEString(), "itemId", null, 0, 1, AttributeIdentify.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(accidentEClass, Accident.class, "Accident", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getAccident_Phenomenon(), ecorePackage.getEString(), "phenomenon", null, 0, 1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAccident_Process(), ecorePackage.getEString(), "process", null, 0, 1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAccident_Analyze(), ecorePackage.getEString(), "analyze", null, 0, 1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAccident_Experience(), ecorePackage.getEString(), "experience", null, 0, 1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getAccident_Component(), this.getComponent(), null, "component", null, 0, 1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getAccident_ConfigElements(), this.getConfigElementSelected(), null, "configElements", null, 0, -1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAccident_ItemId(), ecorePackage.getEString(), "itemId", null, 0, 1, Accident.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(configElementSelectedEClass, ConfigElementSelected.class, "ConfigElementSelected", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getConfigElementSelected_ConfigElement(), this.getConfigElement(), null, "configElement", null, 0, 1, ConfigElementSelected.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getConfigElementSelected_SelectedValue(), ecorePackage.getEString(), "selectedValue", null, 0, 1, ConfigElementSelected.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        // Create resource
        createResource(eNS_URI);

        // Create annotations
        // teneo.jpa
        createTeneoAnnotations();
    }

    /**
     * Initializes the annotations for <b>teneo.jpa</b>.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected void createTeneoAnnotations() {
        String source = "teneo.jpa";		
        addAnnotation
          (this, 
           source, 
           new String[] {
             "value", "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleUUIDHexGenerator\")})"
           });
    }

} //BreakdownPackageImpl
